fix(sr): Fix ESP-SR lib and example for v2.x #11797
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request adds support for custom input formats in the ESP_SR speech recognition library, allowing users to specify the channel layout for microphone and playback data. It also introduces a new partition scheme for ESP_SR models, updates the example and CI configuration to use these changes, and refines the build conditions for ESP_SR to use model storage options instead of wake word/multinet flags.
Speech Recognition Input Format Support:
input_formatparameter to theESP_SR_Class::beginmethod and the underlyingsr_startfunction, allowing users to specify the channel layout for speech recognition (e.g.,"MMNR"for two microphones, one unused, one playback channel). This is reflected in both the header and implementation files (ESP_SR.h,ESP_SR.cpp,esp32-hal-sr.h,esp32-hal-sr.c). [1] [2] [3] [4] [5]Basic.ino) to use the newSR_INPUT_FORMATdefine and to pass it toESP_SR.begin. Added documentation for the input format. [1] [2]Partition Scheme and CI Improvements:
esp_sr_16for ESP32P4 boards, supporting 3MB APP, 7MB SPIFFS, and 2.9MB MODEL, with corresponding upload size and flags inboards.txt.ci.json) to test ESP_SR on ESP32P4 boards with the new partition scheme. [1] [2]Build Condition Refinements:
CONFIG_MODEL_IN_FLASHorCONFIG_MODEL_IN_SDCARDinstead ofCONFIG_USE_WAKENETorCONFIG_USE_MULTINET, ensuring the code is built only when model storage is available. [1] [2] [3] [4]